function resolveShowDirective(directives){
    if (!directives)return;
    let i=directives.length;
    while(i--){
        if (directives[i].name === 'show'){
            return directives[i];
        }
    }
}
function updateShow(oldVnode, vnode){
    const elm = vnode.elm;
    const showDirective = resolveShowDirective(vnode.data.directives);
    if (!showDirective) return;
    if (showDirective.expression){
        elm.style.display= 'block';
    }else{
        elm.style.display ='none';
    }
    
}
export default{
    create: updateShow,
    update: updateShow
}